package com.example.demo01.Repository;

import com.example.demo01.Entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface UserRepository extends JpaRepository<User, Long> {
    User findByUsername(String username);

    // 定义根据 email 查找用户的方法
    User findByEmail(String email);

}
